load("//tools:defaults.bzl", "angular_jasmine_test", "js_test", "ng_web_test_suite", "ts_project")

ts_project(
    name = "signal_authoring_signature_test_lib",
    testonly = True,
    srcs = [
        "linked_signal_signature_test.ts",
        "signal_input_signature_test.ts",
        "signal_model_signature_test.ts",
        "signal_queries_signature_test.ts",
        "simple_changes_signature_test.ts",
        "unwrap_writable_signal_signature_test.ts",
    ],
    deps = [
        "//packages/core",
    ],
)

ts_project(
    name = "type_tester_lib",
    testonly = True,
    srcs = ["type_tester.ts"],
    deps = [
        "//:node_modules/typescript",
    ],
)

filegroup(
    name = "types",
    testonly = True,
    srcs = [
        ":signal_authoring_signature_test_lib",
        ":type_tester_lib",
    ],
    output_group = "types",
)

js_test(
    name = "type_test",
    data = [
        ":type_tester_lib",
        ":types",
        "//packages:package_json",
    ],
    entry_point = ":type_tester.js",
)

ts_project(
    name = "test_lib",
    testonly = True,
    srcs = [
        "input_signal_spec.ts",
        "model_input_spec.ts",
    ],
    deps = [
        "//packages/core",
        "//packages/core/primitives/signals",
        "//packages/core/testing",
    ],
)

angular_jasmine_test(
    name = "test",
    data = [
        ":test_lib",
    ],
)

ng_web_test_suite(
    name = "test_web",
    deps = [":test_lib"],
)
